package cn.kgc.controller;

import cn.kgc.dtos.Dto;
import cn.kgc.service.HotelService;
import cn.kgc.voi.HotCityVo;
import cn.kgc.voi.SearchQueryVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api")
public class HotelController {

    @Resource
    private HotelService hotelService;

    @RequestMapping(value = "/hotellist/searchItripHotelPage",method = RequestMethod.POST)
    public Dto searchHotelList(@RequestBody SearchQueryVo sqv){
        return  hotelService.searchHotel(sqv);
    }

    @RequestMapping(value = "/hotellist/searchItripHotelListByHotCity",method = RequestMethod.POST)
    public Dto searchItripHotelListByHotCity(@RequestBody HotCityVo hotCityVo){
        return  hotelService.searchItripHotelListByHotCity(hotCityVo);
    }

}
